Skip to main content

revXMLStartTree

Type

message

Summary

Sent to the current card when the revXMLCreateTreeFromFile function starts parsing an XML document.

Syntax

revXMLStartTree

Description

Handle the revXMLStartTree message if you want to build your own subset of an XML document.

The revXMLCreateTree or revXMLCreateTreeFromFile functions take XML data and parse it. When you call either of these functions, you can specify whether or not to send messages during the parsing operation.

If you have specified that you want the function to send messages, the revXMLStartTree message is sent when the function begins parsing the XML. If you have specified that you don't want messages sent, no revXMLStartTree messages are sent.

Examples

on revXMLStartTree -- prepare a stack to hold a data subset
ask "Get XML data for which publisher?"
if it is empty then exit to top -- stop parsing
set the currPublisher of this stack to myPublisher -- store value
clone stack "Subtree" of this stack -- new stack to hold data subset
end revXMLStartTree

command: call, revXMLDeleteTree

control structure: function

function: revXMLCreateTreeFromFile, revXMLRootNode, revXMLCreateTree

glossary: current card, message, XML document, function, XML

message: revXMLEndTree, revStartXMLData, revStartXMLNode

Compatibility and Support

Introduced

LiveCode 2.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?